package guoanmaker.operator.business.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import guoanmaker.operator.business.model.OperatorRefuseRecord;


public interface OperatorRefuseRecordRepository extends  JpaRepository<OperatorRefuseRecord, String>, JpaSpecificationExecutor<OperatorRefuseRecord> {
 
	
	@Query("select r from OperatorRefuseRecord r where r.status=1 and r.attributId=:attributId")
	public  List<OperatorRefuseRecord>  selectByRecordforBus1(@Param("attributId") String attributId);
	@Query("select r from OperatorRefuseRecord r where r.status=2 and r.attributId=:attributId")
	public  List<OperatorRefuseRecord>  selectByRecordforBus2(@Param("attributId") String attributId);
	@Query("select r from OperatorRefuseRecord r where r.status=3 and r.attributId=:attributId")
	public  List<OperatorRefuseRecord>  selectByRecordforBus3(@Param("attributId") String attributId);
	@Query("select r from OperatorRefuseRecord r where  r.attributId=:attributId")
	public List<OperatorRefuseRecord> selectById(@Param("attributId") String attributId);
	@Query("select r from OperatorRefuseRecord r where  r.attributId=:attributId  and r.opchannel=4")
	public List<OperatorRefuseRecord> selectByserverCategery(@Param("attributId") String attributId);
	
	
	
}
